<?

require_once ("util/Transformer.php");
require_once ("util/Generator.php");
require_once ("dao/MadDAO.php");

class Msup4_cropper_chancela {

	public function show()
	{

		
		
		$transformer = new Transformer();
		$generator = new Generator();
		$transformer->setDirFisicoTemplates("template/");
		$transformer->setArquivoTemplate("esqueletoFrame.htm");
		//$valoresTroca = array ();
		//$valoresTroca["titulo"] = $this->getTitulo();
		//$valoresTroca["footer"] = $generator->getFooter();
		//$valoresTroca["erro"] = $generator->getErro();
		$valoresTroca["body"] = $this->getBody($_REQUEST);
		$transformer->setValoresTroca($valoresTroca);
		$saida = $transformer->processaHTML();
		echo $saida;
	}

	private function getBody($_REQUEST) {
		
	
		$valoresTroca = array();
		
		//ver($_REQUEST,0);
		
		$valoresTroca['idChancela'] = $_REQUEST['idChancela'];
		$valoresTroca['nome'] = $_REQUEST['nome'];
		$valoresTroca['validade'] = $_REQUEST['validade'];
		$valoresTroca['acao'] = $_REQUEST['acao'];
		
		$transformer = new Transformer();
		$transformer->setDirFisicoTemplates("template/MSup/");
		$transformer->setArquivoTemplate("Msup4_cropper_chancela.htm");
	
		$transformer->setValoresTroca($valoresTroca);
		$saida = $transformer->processaHTML();
		return $saida;
	}
}

?>